/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jpa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author admin
 */
@Entity
@Table(name = "credenzialiTutor")
@NamedQueries({
    @NamedQuery(name = "CredenzialiTutor.findAll", query = "SELECT c FROM CredenzialiTutor c"),
    @NamedQuery(name = "CredenzialiTutor.findByUsername", query = "SELECT c FROM CredenzialiTutor c WHERE c.username = :username"),
    @NamedQuery(name = "CredenzialiTutor.findByPassword", query = "SELECT c FROM CredenzialiTutor c WHERE c.password = :password"),
    @NamedQuery(name = "CredenzialiTutor.findByTutorid", query = "SELECT c FROM CredenzialiTutor c WHERE c.tutorid = :tutorid")})
public class CredenzialiTutor implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "username")
    private String username;
    @Column(name = "password")
    private String password;
    @Column(name = "tutorid")
    private Integer tutorid;

    public CredenzialiTutor() {
    }

    public CredenzialiTutor(String username) {
        this.username = username;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getTutorid() {
        return tutorid;
    }

    public void setTutorid(Integer tutorid) {
        this.tutorid = tutorid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (username != null ? username.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CredenzialiTutor)) {
            return false;
        }
        CredenzialiTutor other = (CredenzialiTutor) object;
        return (this.username != null || other.username == null) && (this.username == null || this.username.equals(other.username));
    }

    @Override
    public String toString() {
        return "jpa.CredenzialiTutor[username=" + username + "]";
    }

}
